package com.xunk.system.entity.ruying;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.List;
import java.util.Map;

public class DeviceProperty {

    /**
     * 设备id
     */
    private String did;
    /**
     * 设备服务id
     */
    private String siid;
    /**
     * 设备服务下的属性id
     */
    private String piid;

    /**
     * 属性type
     */
    private String type;

    /**
     * 属性描述
     */
    private Map<String,String> description;

    /**
     * 参数类型：
     * bool:布尔型
     * float:浮点型
     * string:字符串
     * tlv8：tlv8
     * 整数：
     *      uint32：32无符号整数
     *      uint8:8无符号整数
     *      int32:32位整数
     */
    private String format;

    /**
     * 访问权限
     * read write notify
     */
    private List<String> access;

    /**
     * 取值范围
     * size=2,上下限
     * size=3，上下限和步长
     */
    private List<Long> valueRange;

    /**
     * {
     *     "value": 0,
     *     "description": "Relay Mode"
     * }
     */
    private List<Map<String,String>> valueList;

    /**
     * 单位
     */
    private String unit;

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public String getSiid() {
        return siid;
    }

    @JSONField(name = "iid")
    public void setSiid(String siid) {
        this.siid = siid;
    }

    public String getPiid() {
        return piid;
    }

    public void setPiid(String piid) {
        this.piid = piid;
    }

    public String getType() {
        return type;
    }
    @JSONField(name = "type")
    public void setType(String type) {
        this.type = type;
    }

    public Map<String, String> getDescription() {
        return description;
    }
    @JSONField(name = "description")
    public void setDescription(Map<String, String> description) {
        this.description = description;
    }

    public String getFormat() {
        return format;
    }
    @JSONField(name = "format")
    public void setFormat(String format) {
        this.format = format;
    }

    public List<String> getAccess() {
        return access;
    }
    @JSONField(name = "access")
    public void setAccess(List<String> access) {
        this.access = access;
    }

    public List<Long> getValueRange() {
        return valueRange;
    }
    @JSONField(name = "value-range")
    public void setValueRange(List<Long> valueRange) {
        this.valueRange = valueRange;
    }

    public List<Map<String, String>> getValueList() {
        return valueList;
    }
    @JSONField(name = "value-list")
    public void setValueList(List<Map<String, String>> valueList) {
        this.valueList = valueList;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }
}
